Optimal. Leaf size=100 \[ -\frac {3 a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {b \cot ^2(c+d x)}{d}-\frac {b \cot ^4(c+d x)}{4 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {b \log (\tan (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3957, 2913,
2700, 272, 45, 3853, 3855} \begin {gather*} -\frac {3 a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {b \cot ^4(c+d x)}{4 d}-\frac {b \cot ^2(c+d x)}{d}+\frac {b \log (\tan (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2700
Rule 2913
Rule 3853
Rule 3855
Rule 3957
Rubi steps
\begin {align*} \int \csc ^5(c+d x) (a+b \sec (c+d x)) \, dx &=-\int (-b-a \cos (c+d x)) \csc ^5(c+d x) \sec (c+d x) \, dx\\ &=a \int \csc ^5(c+d x) \, dx+b \int \csc ^5(c+d x) \sec (c+d x) \, dx\\ &=-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {1}{4} (3 a) \int \csc ^3(c+d x) \, dx+\frac {b \text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^5} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {1}{8} (3 a) \int \csc (c+d x) \, dx+\frac {b \text {Subst}\left (\int \frac {(1+x)^2}{x^3} \, dx,x,\tan ^2(c+d x)\right )}{2 d}\\ &=-\frac {3 a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {b \text {Subst}\left (\int \left (\frac {1}{x^3}+\frac {2}{x^2}+\frac {1}{x}\right ) \, dx,x,\tan ^2(c+d x)\right )}{2 d}\\ &=-\frac {3 a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {b \cot ^2(c+d x)}{d}-\frac {b \cot ^4(c+d x)}{4 d}-\frac {3 a \cot (c+d x) \csc (c+d x)}{8 d}-\frac {a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac {b \log (\tan (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.38, size = 164, normalized size = 1.64 \begin {gather*} -\frac {3 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {b \left (2 \csc ^2(c+d x)+\csc ^4(c+d x)+4 \log (\cos (c+d x))-4 \log (\sin (c+d x))\right )}{4 d}+\frac {3 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 83, normalized size = 0.83
method | result | size |
derivativedivides | \(\frac {b \left (-\frac {1}{4 \sin \left (d x +c \right )^{4}}-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(83\) |
default | \(\frac {b \left (-\frac {1}{4 \sin \left (d x +c \right )^{4}}-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )}{d}\) | \(83\) |
norman | \(\frac {-\frac {a +b}{64 d}+\frac {\left (a -b \right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64 d}+\frac {\left (2 a -3 b \right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {\left (2 a +3 b \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}+\frac {\left (3 a +8 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(148\) |
risch | \(\frac {3 a \,{\mathrm e}^{7 i \left (d x +c \right )}+8 b \,{\mathrm e}^{6 i \left (d x +c \right )}-11 a \,{\mathrm e}^{5 i \left (d x +c \right )}-32 b \,{\mathrm e}^{4 i \left (d x +c \right )}-11 a \,{\mathrm e}^{3 i \left (d x +c \right )}+8 b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )} a}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b}{d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(193\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 110, normalized size = 1.10 \begin {gather*} -\frac {{\left (3 \, a - 8 \, b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) - {\left (3 \, a + 8 \, b\right )} \log \left (\cos \left (d x + c\right ) - 1\right ) + 16 \, b \log \left (\cos \left (d x + c\right )\right ) - \frac {2 \, {\left (3 \, a \cos \left (d x + c\right )^{3} + 4 \, b \cos \left (d x + c\right )^{2} - 5 \, a \cos \left (d x + c\right ) - 6 \, b\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 201 vs.
\(2 (92) = 184\).
time = 2.74, size = 201, normalized size = 2.01 \begin {gather*} \frac {6 \, a \cos \left (d x + c\right )^{3} + 8 \, b \cos \left (d x + c\right )^{2} - 10 \, a \cos \left (d x + c\right ) - 16 \, {\left (b \cos \left (d x + c\right )^{4} - 2 \, b \cos \left (d x + c\right )^{2} + b\right )} \log \left (-\cos \left (d x + c\right )\right ) - {\left ({\left (3 \, a - 8 \, b\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a - 8 \, b\right )} \cos \left (d x + c\right )^{2} + 3 \, a - 8 \, b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left ({\left (3 \, a + 8 \, b\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a + 8 \, b\right )} \cos \left (d x + c\right )^{2} + 3 \, a + 8 \, b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 12 \, b}{16 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \csc ^{5}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 266 vs.
\(2 (92) = 184\).
time = 0.48, size = 266, normalized size = 2.66 \begin {gather*} \frac {4 \, {\left (3 \, a + 8 \, b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 64 \, b \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) - \frac {{\left (a + b - \frac {8 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {12 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {18 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {48 \, b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) - 1\right )}^{2}} - \frac {8 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {12 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.98, size = 117, normalized size = 1.17 \begin {gather*} \frac {\ln \left (\cos \left (c+d\,x\right )-1\right )\,\left (\frac {3\,a}{16}+\frac {b}{2}\right )}{d}-\frac {-\frac {3\,a\,{\cos \left (c+d\,x\right )}^3}{8}-\frac {b\,{\cos \left (c+d\,x\right )}^2}{2}+\frac {5\,a\,\cos \left (c+d\,x\right )}{8}+\frac {3\,b}{4}}{d\,\left ({\cos \left (c+d\,x\right )}^4-2\,{\cos \left (c+d\,x\right )}^2+1\right )}-\frac {\ln \left (\cos \left (c+d\,x\right )+1\right )\,\left (\frac {3\,a}{16}-\frac {b}{2}\right )}{d}-\frac {b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________